
# replication code for 
# Crude Credit: The Political Economy of Natural Resource Booms and Sovereign Debt Management
# Iasmin Goes and Stephen B. Kaplan

# to replicate the results of this paper, please begin by running the following lines of code,
# which install all the packages in the exact version we used for the analysis
# please send questions to iasmin@colostate.edu

# ─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────
# setting  value
# version  R version 4.3.2 (2023-10-31)
# os       macOS Ventura 13.6.1
# system   x86_64, darwin20
# ui       RStudio
# language (EN)
# collate  en_US.UTF-8
# ctype    en_US.UTF-8
# tz       America/Denver
# date     2023-12-10
# rstudio  2023.09.1+494 Desert Sunflower (desktop)
# pandoc   3.1.9 @ /usr/local/bin/pandoc

install.packages("Require")

library(Require)

Require(c("rio (==0.5.29)","tidyverse (==2.0.0)","zoo (==1.8-12)",
          "scales (==1.2.1)","cowplot (==1.1.1)","ggeffects (==1.3.2)",
          "texreg (==1.38.6)","stargazer (==5.2.3)","fastDummies (==1.7.3)",
          "systemfit (==1.1-30)","AER (==1.2-10)","brglm2 (==0.9)",
          "lmtest (==0.9-40)","sandwich (==3.0-2)","forecast (==8.21.1)",
          "urca (==1.3-3)","emmeans (==1.8.6)","fixest (==0.11.1)",
          "plm (==2.6-3)"))